import React from 'react';
import { useId, useEffect } from 'react'
// useId作用就是生成一个唯一的id

const Father = () => {
    const id = useId();
    const id1 = useId();
    console.log('id', id);
    console.log('id1', id1);

    useEffect(() => {
        console.log(document.getElementById(id));
    }, [])
    return (
        <div>
            {/* <label htmlFor={id}> 江山</label> */}
            <input id={id} type='checkbox' />

        </div>
    );
}

export default Father;
